// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: chat.proto

package org.tio.examples.im.common.packets;

/**
 * <pre>
 **
 * 鉴权请求
 * </pre>
 *
 * Protobuf type {@code AuthReqBody}
 */
public  final class AuthReqBody extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:AuthReqBody)
    AuthReqBodyOrBuilder {
  // Use AuthReqBody.newBuilder() to construct.
  private AuthReqBody(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private AuthReqBody() {
    token_ = "";
    deviceId_ = "";
    seq_ = 0L;
    deviceType_ = 0;
    cid_ = "";
    appVersion_ = "";
    deviceInfo_ = "";
    sign_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private AuthReqBody(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!input.skipField(tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            token_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            deviceId_ = s;
            break;
          }
          case 24: {

            seq_ = input.readInt64();
            break;
          }
          case 32: {
            int rawValue = input.readEnum();

            deviceType_ = rawValue;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            cid_ = s;
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            appVersion_ = s;
            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            deviceInfo_ = s;
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();

            sign_ = s;
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tio.examples.im.common.packets.Chat.internal_static_AuthReqBody_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tio.examples.im.common.packets.Chat.internal_static_AuthReqBody_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tio.examples.im.common.packets.AuthReqBody.class, org.tio.examples.im.common.packets.AuthReqBody.Builder.class);
  }

  public static final int TOKEN_FIELD_NUMBER = 1;
  private volatile java.lang.Object token_;
  /**
   * <pre>
   *鉴权token
   * </pre>
   *
   * <code>string token = 1;</code>
   */
  public java.lang.String getToken() {
    java.lang.Object ref = token_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      token_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *鉴权token
   * </pre>
   *
   * <code>string token = 1;</code>
   */
  public com.google.protobuf.ByteString
      getTokenBytes() {
    java.lang.Object ref = token_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      token_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEVICEID_FIELD_NUMBER = 2;
  private volatile java.lang.Object deviceId_;
  /**
   * <pre>
   * device id(手机设备id)
   * </pre>
   *
   * <code>string deviceId = 2;</code>
   */
  public java.lang.String getDeviceId() {
    java.lang.Object ref = deviceId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      deviceId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * device id(手机设备id)
   * </pre>
   *
   * <code>string deviceId = 2;</code>
   */
  public com.google.protobuf.ByteString
      getDeviceIdBytes() {
    java.lang.Object ref = deviceId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      deviceId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SEQ_FIELD_NUMBER = 3;
  private long seq_;
  /**
   * <pre>
   *序列号
   * </pre>
   *
   * <code>int64 seq = 3;</code>
   */
  public long getSeq() {
    return seq_;
  }

  public static final int DEVICETYPE_FIELD_NUMBER = 4;
  private int deviceType_;
  /**
   * <pre>
   *clienttype客户端类型1-pc 2-android 3-ios
   * </pre>
   *
   * <code>.DeviceType deviceType = 4;</code>
   */
  public int getDeviceTypeValue() {
    return deviceType_;
  }
  /**
   * <pre>
   *clienttype客户端类型1-pc 2-android 3-ios
   * </pre>
   *
   * <code>.DeviceType deviceType = 4;</code>
   */
  public org.tio.examples.im.common.packets.DeviceType getDeviceType() {
    org.tio.examples.im.common.packets.DeviceType result = org.tio.examples.im.common.packets.DeviceType.valueOf(deviceType_);
    return result == null ? org.tio.examples.im.common.packets.DeviceType.UNRECOGNIZED : result;
  }

  public static final int CID_FIELD_NUMBER = 5;
  private volatile java.lang.Object cid_;
  /**
   * <pre>
   *渠道号
   * </pre>
   *
   * <code>string cid = 5;</code>
   */
  public java.lang.String getCid() {
    java.lang.Object ref = cid_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      cid_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *渠道号
   * </pre>
   *
   * <code>string cid = 5;</code>
   */
  public com.google.protobuf.ByteString
      getCidBytes() {
    java.lang.Object ref = cid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      cid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int APPVERSION_FIELD_NUMBER = 6;
  private volatile java.lang.Object appVersion_;
  /**
   * <pre>
   *app版本号
   * </pre>
   *
   * <code>string appVersion = 6;</code>
   */
  public java.lang.String getAppVersion() {
    java.lang.Object ref = appVersion_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      appVersion_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *app版本号
   * </pre>
   *
   * <code>string appVersion = 6;</code>
   */
  public com.google.protobuf.ByteString
      getAppVersionBytes() {
    java.lang.Object ref = appVersion_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      appVersion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEVICEINFO_FIELD_NUMBER = 7;
  private volatile java.lang.Object deviceInfo_;
  /**
   * <pre>
   *手机型号信息，譬如华为某型号
   * </pre>
   *
   * <code>string deviceInfo = 7;</code>
   */
  public java.lang.String getDeviceInfo() {
    java.lang.Object ref = deviceInfo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      deviceInfo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *手机型号信息，譬如华为某型号
   * </pre>
   *
   * <code>string deviceInfo = 7;</code>
   */
  public com.google.protobuf.ByteString
      getDeviceInfoBytes() {
    java.lang.Object ref = deviceInfo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      deviceInfo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SIGN_FIELD_NUMBER = 8;
  private volatile java.lang.Object sign_;
  /**
   * <pre>
   *签名
   * </pre>
   *
   * <code>string sign = 8;</code>
   */
  public java.lang.String getSign() {
    java.lang.Object ref = sign_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      sign_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *签名
   * </pre>
   *
   * <code>string sign = 8;</code>
   */
  public com.google.protobuf.ByteString
      getSignBytes() {
    java.lang.Object ref = sign_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      sign_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getTokenBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_);
    }
    if (!getDeviceIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceId_);
    }
    if (seq_ != 0L) {
      output.writeInt64(3, seq_);
    }
    if (deviceType_ != org.tio.examples.im.common.packets.DeviceType.DEVICE_TYPE_UNKNOW.getNumber()) {
      output.writeEnum(4, deviceType_);
    }
    if (!getCidBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cid_);
    }
    if (!getAppVersionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, appVersion_);
    }
    if (!getDeviceInfoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, deviceInfo_);
    }
    if (!getSignBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, sign_);
    }
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getTokenBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_);
    }
    if (!getDeviceIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceId_);
    }
    if (seq_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(3, seq_);
    }
    if (deviceType_ != org.tio.examples.im.common.packets.DeviceType.DEVICE_TYPE_UNKNOW.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, deviceType_);
    }
    if (!getCidBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cid_);
    }
    if (!getAppVersionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, appVersion_);
    }
    if (!getDeviceInfoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, deviceInfo_);
    }
    if (!getSignBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, sign_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof org.tio.examples.im.common.packets.AuthReqBody)) {
      return super.equals(obj);
    }
    org.tio.examples.im.common.packets.AuthReqBody other = (org.tio.examples.im.common.packets.AuthReqBody) obj;

    boolean result = true;
    result = result && getToken()
        .equals(other.getToken());
    result = result && getDeviceId()
        .equals(other.getDeviceId());
    result = result && (getSeq()
        == other.getSeq());
    result = result && deviceType_ == other.deviceType_;
    result = result && getCid()
        .equals(other.getCid());
    result = result && getAppVersion()
        .equals(other.getAppVersion());
    result = result && getDeviceInfo()
        .equals(other.getDeviceInfo());
    result = result && getSign()
        .equals(other.getSign());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getToken().hashCode();
    hash = (37 * hash) + DEVICEID_FIELD_NUMBER;
    hash = (53 * hash) + getDeviceId().hashCode();
    hash = (37 * hash) + SEQ_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getSeq());
    hash = (37 * hash) + DEVICETYPE_FIELD_NUMBER;
    hash = (53 * hash) + deviceType_;
    hash = (37 * hash) + CID_FIELD_NUMBER;
    hash = (53 * hash) + getCid().hashCode();
    hash = (37 * hash) + APPVERSION_FIELD_NUMBER;
    hash = (53 * hash) + getAppVersion().hashCode();
    hash = (37 * hash) + DEVICEINFO_FIELD_NUMBER;
    hash = (53 * hash) + getDeviceInfo().hashCode();
    hash = (37 * hash) + SIGN_FIELD_NUMBER;
    hash = (53 * hash) + getSign().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tio.examples.im.common.packets.AuthReqBody parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.tio.examples.im.common.packets.AuthReqBody prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   **
   * 鉴权请求
   * </pre>
   *
   * Protobuf type {@code AuthReqBody}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:AuthReqBody)
      org.tio.examples.im.common.packets.AuthReqBodyOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tio.examples.im.common.packets.Chat.internal_static_AuthReqBody_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tio.examples.im.common.packets.Chat.internal_static_AuthReqBody_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tio.examples.im.common.packets.AuthReqBody.class, org.tio.examples.im.common.packets.AuthReqBody.Builder.class);
    }

    // Construct using org.tio.examples.im.common.packets.AuthReqBody.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      token_ = "";

      deviceId_ = "";

      seq_ = 0L;

      deviceType_ = 0;

      cid_ = "";

      appVersion_ = "";

      deviceInfo_ = "";

      sign_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tio.examples.im.common.packets.Chat.internal_static_AuthReqBody_descriptor;
    }

    public org.tio.examples.im.common.packets.AuthReqBody getDefaultInstanceForType() {
      return org.tio.examples.im.common.packets.AuthReqBody.getDefaultInstance();
    }

    public org.tio.examples.im.common.packets.AuthReqBody build() {
      org.tio.examples.im.common.packets.AuthReqBody result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public org.tio.examples.im.common.packets.AuthReqBody buildPartial() {
      org.tio.examples.im.common.packets.AuthReqBody result = new org.tio.examples.im.common.packets.AuthReqBody(this);
      result.token_ = token_;
      result.deviceId_ = deviceId_;
      result.seq_ = seq_;
      result.deviceType_ = deviceType_;
      result.cid_ = cid_;
      result.appVersion_ = appVersion_;
      result.deviceInfo_ = deviceInfo_;
      result.sign_ = sign_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.tio.examples.im.common.packets.AuthReqBody) {
        return mergeFrom((org.tio.examples.im.common.packets.AuthReqBody)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tio.examples.im.common.packets.AuthReqBody other) {
      if (other == org.tio.examples.im.common.packets.AuthReqBody.getDefaultInstance()) return this;
      if (!other.getToken().isEmpty()) {
        token_ = other.token_;
        onChanged();
      }
      if (!other.getDeviceId().isEmpty()) {
        deviceId_ = other.deviceId_;
        onChanged();
      }
      if (other.getSeq() != 0L) {
        setSeq(other.getSeq());
      }
      if (other.deviceType_ != 0) {
        setDeviceTypeValue(other.getDeviceTypeValue());
      }
      if (!other.getCid().isEmpty()) {
        cid_ = other.cid_;
        onChanged();
      }
      if (!other.getAppVersion().isEmpty()) {
        appVersion_ = other.appVersion_;
        onChanged();
      }
      if (!other.getDeviceInfo().isEmpty()) {
        deviceInfo_ = other.deviceInfo_;
        onChanged();
      }
      if (!other.getSign().isEmpty()) {
        sign_ = other.sign_;
        onChanged();
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      org.tio.examples.im.common.packets.AuthReqBody parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tio.examples.im.common.packets.AuthReqBody) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object token_ = "";
    /**
     * <pre>
     *鉴权token
     * </pre>
     *
     * <code>string token = 1;</code>
     */
    public java.lang.String getToken() {
      java.lang.Object ref = token_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        token_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *鉴权token
     * </pre>
     *
     * <code>string token = 1;</code>
     */
    public com.google.protobuf.ByteString
        getTokenBytes() {
      java.lang.Object ref = token_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        token_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *鉴权token
     * </pre>
     *
     * <code>string token = 1;</code>
     */
    public Builder setToken(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      token_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *鉴权token
     * </pre>
     *
     * <code>string token = 1;</code>
     */
    public Builder clearToken() {
      
      token_ = getDefaultInstance().getToken();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *鉴权token
     * </pre>
     *
     * <code>string token = 1;</code>
     */
    public Builder setTokenBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      token_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object deviceId_ = "";
    /**
     * <pre>
     * device id(手机设备id)
     * </pre>
     *
     * <code>string deviceId = 2;</code>
     */
    public java.lang.String getDeviceId() {
      java.lang.Object ref = deviceId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deviceId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * device id(手机设备id)
     * </pre>
     *
     * <code>string deviceId = 2;</code>
     */
    public com.google.protobuf.ByteString
        getDeviceIdBytes() {
      java.lang.Object ref = deviceId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        deviceId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * device id(手机设备id)
     * </pre>
     *
     * <code>string deviceId = 2;</code>
     */
    public Builder setDeviceId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      deviceId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * device id(手机设备id)
     * </pre>
     *
     * <code>string deviceId = 2;</code>
     */
    public Builder clearDeviceId() {
      
      deviceId_ = getDefaultInstance().getDeviceId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * device id(手机设备id)
     * </pre>
     *
     * <code>string deviceId = 2;</code>
     */
    public Builder setDeviceIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      deviceId_ = value;
      onChanged();
      return this;
    }

    private long seq_ ;
    /**
     * <pre>
     *序列号
     * </pre>
     *
     * <code>int64 seq = 3;</code>
     */
    public long getSeq() {
      return seq_;
    }
    /**
     * <pre>
     *序列号
     * </pre>
     *
     * <code>int64 seq = 3;</code>
     */
    public Builder setSeq(long value) {
      
      seq_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *序列号
     * </pre>
     *
     * <code>int64 seq = 3;</code>
     */
    public Builder clearSeq() {
      
      seq_ = 0L;
      onChanged();
      return this;
    }

    private int deviceType_ = 0;
    /**
     * <pre>
     *clienttype客户端类型1-pc 2-android 3-ios
     * </pre>
     *
     * <code>.DeviceType deviceType = 4;</code>
     */
    public int getDeviceTypeValue() {
      return deviceType_;
    }
    /**
     * <pre>
     *clienttype客户端类型1-pc 2-android 3-ios
     * </pre>
     *
     * <code>.DeviceType deviceType = 4;</code>
     */
    public Builder setDeviceTypeValue(int value) {
      deviceType_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *clienttype客户端类型1-pc 2-android 3-ios
     * </pre>
     *
     * <code>.DeviceType deviceType = 4;</code>
     */
    public org.tio.examples.im.common.packets.DeviceType getDeviceType() {
      org.tio.examples.im.common.packets.DeviceType result = org.tio.examples.im.common.packets.DeviceType.valueOf(deviceType_);
      return result == null ? org.tio.examples.im.common.packets.DeviceType.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     *clienttype客户端类型1-pc 2-android 3-ios
     * </pre>
     *
     * <code>.DeviceType deviceType = 4;</code>
     */
    public Builder setDeviceType(org.tio.examples.im.common.packets.DeviceType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      deviceType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *clienttype客户端类型1-pc 2-android 3-ios
     * </pre>
     *
     * <code>.DeviceType deviceType = 4;</code>
     */
    public Builder clearDeviceType() {
      
      deviceType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object cid_ = "";
    /**
     * <pre>
     *渠道号
     * </pre>
     *
     * <code>string cid = 5;</code>
     */
    public java.lang.String getCid() {
      java.lang.Object ref = cid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        cid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *渠道号
     * </pre>
     *
     * <code>string cid = 5;</code>
     */
    public com.google.protobuf.ByteString
        getCidBytes() {
      java.lang.Object ref = cid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        cid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *渠道号
     * </pre>
     *
     * <code>string cid = 5;</code>
     */
    public Builder setCid(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      cid_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *渠道号
     * </pre>
     *
     * <code>string cid = 5;</code>
     */
    public Builder clearCid() {
      
      cid_ = getDefaultInstance().getCid();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *渠道号
     * </pre>
     *
     * <code>string cid = 5;</code>
     */
    public Builder setCidBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      cid_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object appVersion_ = "";
    /**
     * <pre>
     *app版本号
     * </pre>
     *
     * <code>string appVersion = 6;</code>
     */
    public java.lang.String getAppVersion() {
      java.lang.Object ref = appVersion_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        appVersion_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *app版本号
     * </pre>
     *
     * <code>string appVersion = 6;</code>
     */
    public com.google.protobuf.ByteString
        getAppVersionBytes() {
      java.lang.Object ref = appVersion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        appVersion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *app版本号
     * </pre>
     *
     * <code>string appVersion = 6;</code>
     */
    public Builder setAppVersion(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      appVersion_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *app版本号
     * </pre>
     *
     * <code>string appVersion = 6;</code>
     */
    public Builder clearAppVersion() {
      
      appVersion_ = getDefaultInstance().getAppVersion();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *app版本号
     * </pre>
     *
     * <code>string appVersion = 6;</code>
     */
    public Builder setAppVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      appVersion_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object deviceInfo_ = "";
    /**
     * <pre>
     *手机型号信息，譬如华为某型号
     * </pre>
     *
     * <code>string deviceInfo = 7;</code>
     */
    public java.lang.String getDeviceInfo() {
      java.lang.Object ref = deviceInfo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deviceInfo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *手机型号信息，譬如华为某型号
     * </pre>
     *
     * <code>string deviceInfo = 7;</code>
     */
    public com.google.protobuf.ByteString
        getDeviceInfoBytes() {
      java.lang.Object ref = deviceInfo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        deviceInfo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *手机型号信息，譬如华为某型号
     * </pre>
     *
     * <code>string deviceInfo = 7;</code>
     */
    public Builder setDeviceInfo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      deviceInfo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *手机型号信息，譬如华为某型号
     * </pre>
     *
     * <code>string deviceInfo = 7;</code>
     */
    public Builder clearDeviceInfo() {
      
      deviceInfo_ = getDefaultInstance().getDeviceInfo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *手机型号信息，譬如华为某型号
     * </pre>
     *
     * <code>string deviceInfo = 7;</code>
     */
    public Builder setDeviceInfoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      deviceInfo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object sign_ = "";
    /**
     * <pre>
     *签名
     * </pre>
     *
     * <code>string sign = 8;</code>
     */
    public java.lang.String getSign() {
      java.lang.Object ref = sign_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sign_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *签名
     * </pre>
     *
     * <code>string sign = 8;</code>
     */
    public com.google.protobuf.ByteString
        getSignBytes() {
      java.lang.Object ref = sign_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        sign_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *签名
     * </pre>
     *
     * <code>string sign = 8;</code>
     */
    public Builder setSign(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      sign_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *签名
     * </pre>
     *
     * <code>string sign = 8;</code>
     */
    public Builder clearSign() {
      
      sign_ = getDefaultInstance().getSign();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *签名
     * </pre>
     *
     * <code>string sign = 8;</code>
     */
    public Builder setSignBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      sign_ = value;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }


    // @@protoc_insertion_point(builder_scope:AuthReqBody)
  }

  // @@protoc_insertion_point(class_scope:AuthReqBody)
  private static final org.tio.examples.im.common.packets.AuthReqBody DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tio.examples.im.common.packets.AuthReqBody();
  }

  public static org.tio.examples.im.common.packets.AuthReqBody getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<AuthReqBody>
      PARSER = new com.google.protobuf.AbstractParser<AuthReqBody>() {
    public AuthReqBody parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
        return new AuthReqBody(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<AuthReqBody> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<AuthReqBody> getParserForType() {
    return PARSER;
  }

  public org.tio.examples.im.common.packets.AuthReqBody getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

